WOLFRAM NOTEBOOK

Basic Examples 
(6)
 

In[173]:=
ResourceData
Out[173]=
Make a graph of bordering administrative divisions:
In[198]:=
graph=RelationGraphMemberQ[#1]ResourceData
[#2,"bordering-administrative-divisions"]&,Normal@KeysResourceData
[All,First],VertexLabels->"Name"
Out[198]=
Find a vertex coloring for the graph:
In[175]:=
coloring=FindVertexColoring[graph,ColorData[106,"ColorList"]]
Out[175]=
,
,
,
,
,
,
,
,
,
,
,
,
Color the vertices with the
ResourceFunction
ColorGraphVertices:
In[176]:=
ColorGraphVertices[graph,VertexSize->Large,ImageSize->Large]
Out[176]=
Make a map:
In[179]:=
GeoRegionValuePlot[VertexList[graph]->coloring,GeoBackground->"VectorBusiness",ImageSize->Full,GeoLabels->True]
Out[179]=
Break the graph into the mainland component and the island of Corsica:
In[199]:=
WeaklyConnectedGraphComponents[graph,VertexLabels->"Name"]
Out[199]=
,
Compare with the
Entity
framework:
In[201]:=
EntityValue
Grand Est, France
ADMINISTRATIVE DIVISION
,"BorderingStates"
Out[201]=
Missing[NotAvailable]
In[203]:=
EntityValue
Grand Est, France
ADMINISTRATIVE DIVISION
,"BorderingCounties"
Out[203]=
Missing[NotAvailable]
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.